<?php
/**
 * IWpLog.php
 * 
 * This file contains the interface for WpLog classes
 * @author Robert Schmidt <robert@wildpack.de>
 * @version 1.0
 * @package wildpack
 * @subpackage base.wplog
 */ 

/**
 * An Interface for WpLog implementations
 * 
 * @author Robert Schmidt <robert@wildpack.de>
 * @version 1.0
 * @package wildpack
 * @subpackage base.wplog
 */
interface IWpLog
{
	/**
	 * Retrieves the current log level
	 * @return The current log level
	 */
	function getLevel();

	/** 
	 * Logs a runtime error
	 * @param string $location The location of the error
	 * @param string $user The logged-in user
	 * @param string $title The error title
	 * @param string $body The error body 
	 * @param string $number The error number
	 * @param int $level The level of this message [optional]
	 * @return True if successfully processed, false else
	 */
	function logError($location, $user, $title, $body, $number, $level=1);
	
	/** 
	 * Logs a runtime message
	 * @param string $location The location of the message
	 * @param string $user The logged-in user
	 * @param string $title The message title
	 * @param string $body The message body 
	 * @param string $number The message number
	 * @param int $level The level of this message [optional]
	 * @return True if successfully processed, false else
	 */
	function logMessage($location, $user, $title, $body, $number, $level=1);
	
	/** 
	 * Logs a runtime action
	 * @param string $location The location of the action
	 * @param string $user The logged-in user
	 * @param string $title The action title
	 * @param string $body The action body 
	 * @param string $number The error number
	 * @param int $level The level of this action [optional]
	 * @return True if successfully processed, false else
	 */
	function logAction($location, $user, $title, $body, $number, $level=1);
	
	/** 
	 * Logs an audit entry
	 * @param string $location The location of the audit
	 * @param string $user The logged-in user
	 * @param string $title The audit title
	 * @param string $body The audit body 
	 * @param string $number The audit number
	 */
	function logAudit($location, $user, $title, $body, $number);
	
	/**
	 * Sets the maximum level of the log entries to accept. The higher the level the more detailed the log will be.
	 * Basically all errors and important messages should be of level 1, whereas debugging information should be of level 3 or higher.
	 * @param int $level The log level to use for filtering log entries
	 */
	function setLevel($level);
}

/* End of file IWpLog.php */
/* Location: ./wildpack/base/wplog/IWpLog.php */ 
